import {App, Config, ViewController} from "ionic-angular";
import {AdpActionSheetComponent} from "./adp-action-sheet.component";
import {ActionSheetOptions} from "./adp-action-sheet-options";
import {NavOptions} from "ionic-angular/navigation/nav-util";

export class AdpActionSheet extends ViewController {
    private _app: App;

    constructor(_app: App,
                opts: ActionSheetOptions,
                config: Config) {
        super(AdpActionSheetComponent, opts, null);
        this._app = _app;
    }

    present(navOptions: NavOptions = {}): Promise<any> {
        navOptions.minClickBlockDuration = navOptions.minClickBlockDuration || 400;
        navOptions.duration = 50;
        return this._app.present(this, navOptions);
    }
}
